import request from '@/utils/request'

/* export function login(data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
 */

// Login
// 登入也 验证码图片
export const valiDateImg = (clientToken) => {
  return request({
    url: `/user-service/user/imageCode/${clientToken}`,
    responseType: 'arraybuffer' // 该字段需要添加，不然返回的res.data会是乱码
  })
}

// 登入
export const LoginApi = (data) => {
  return request({
    url: '/user-service/user/login',
    method: 'POST',
    data
  })
}
// ------------------------------------------------------------------------

// 根据售货机获取运营人员列表;  工单里 设备编号 得到运营人员

export const getUserService = (innerCode) => {
  return request({
    url: `/user-service/user/operatorList/${innerCode}`
  })
}

// 补货详情
export const goodsInfo = (innerCode) => {
  return request({
    url: `/vm-service/channel/channelList/${innerCode}`
  })
}

